#ifndef SMART_PLC_H
#define SMART_PLC_H
#include <qglobal.h>//基本数据类型

#include <QDebug>
#include <QMessageBox>
#include <QString>
#include "comfunc.h"
#include "mainwindow.h"
#include "protocol.h"
/***********************本地命令控制字************************/
#define _ACK            0x00
#define _NACK           0xFF
#define CMD_SET_AID     0x01
#define CMD_GET_AID     0x03
#define CMD_ACK_AID     0x13
#define CMD_DEL_AID     0x04
#define CMD_REQ_AID     0x05
#define CMD_GET_SID     0x06
#define CMD_ACK_SID     0x16
#define CMD_GET_EID     0x07
#define CMD_ACK_EID     0x17
#define CMD_SET_BPS     0x08
#define CMD_SET_REG     0x09
#define CMD_UNLINK      0x0A
#define CMD_REGINFOR    0x0B
#define CMD_SET_PANID   0x0C
#define CMD_GET_GWAID   0x0D
#define CMD_GET_PANID   0x0f

#define CMD_ACK         0x00
#define CMD_NAK         0xFF

#define CMD_SET         0x07
#define CMD_GET         0x02
#define CMD_UPDATE      0x05
#define CMD_REPORT      0x01

#define FRAME_INFOR     0x08

struct Local_did_Analy
{
    uint8 cmd;
    uint8 data_len;//该cmd对应的数据长度
    const char* analy_str;//本地did/CMD的解析内容
};

//struct Local_did_Analy *get_local_cmd_analy(uint8 cmd);

void get_local_cmd_analy(uint8 cmd, QString &cmdAnaly, QString &dataAnalyType);

#endif // SMART_PLC_H
